/**
  ******************************************************************************
  * @file    Devices_Frame.c
  * @author  AnshininTakaha
  * @version V1.6
  * @date		 2021/12/29
  * @brief   The file of module devices frame.
	* @copyright (c) 2017-2021 JZI. All rights reserved.
  ******************************************************************************
  */
/* Includes ------------------------------------------------------------------*/
#include "Devices_Frame.h"

#include "Devices_LED.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/


/* Exported mention ----------------------------------------------------------*/
void Frame_LID_LidarCheck(void);
void Frame_LID_LidarGain(void);


/* Exported variables --------------------------------------------------------*/
/* Frame Function */
Frame_Fuc Frame_Function = Frame_FucGroundInit;
#undef Frame_FucGroundInit

/* Frame Check Frames */
Frame_Check_t Frame_Check;


/* Exported functions --------------------------------------------------------*/
/**
 * @brief  Framecheck of the lidar devices.
 * @param  void.
 * @return void.
 */
void Frame_LID_LidarCheck(void)
{
	/* Check Lidar Running Frame */
	if(Frame_Check.LidarFrame > 0)
	{
		Frame_Check.LidarFrame = 0;
		Frame_Check.LidarState = 1;
	}
	else
	{
		LED_Function.LED_LID_Erroring();
		Frame_Check.LidarState = 0;
	}
}



/**
 * @brief  Framegain of the lidar devices.
 * @param  void.
 * @return void.
 */
void Frame_LID_LidarGain(void)
{
	Frame_Check.LidarFrame++;
}

/* End -----------------------------------------------------------------------*/
